package cn.lynch.bbs.init;

import org.hibernate.SessionFactory;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.lynch.bbs.domain.Forum;

public class InitDatabase {

	@Test
	public void update() { // hbm2ddl=update
		SessionFactory sf = (SessionFactory)new ClassPathXmlApplicationContext("applicationContext.xml").getBean("sessionFactory");
		
		System.out.println(sf.getClassMetadata(Forum.class)
				.getIdentifierPropertyName());
	}
}
